<?php
/**
 * Enter description here...
 *	
 * STATUS_DISABLE 0 
 * STATUS_ABLE 1 
 */
class Groups extends CActiveRecord {
	public static function model($className = __CLASS__) {
		return parent::model ( $className );
	}
	
	public function tableName() {
		return '{{groups}}';
	}
	
	public function rules() {
		return array (
			
			array (
				
				'title', 
				'required', 
				'message' => '不能为空' 
			) 
		);
	}
	
	public function relations() {
		return array ();
	}
	
	public function attributeLabels() {
		return array (
			
			'id' => 'id', 
			'title' => 'title' 
		);
	}
	
	function getAll() {
		$ret = $this->findAll ();
		$rows = CommonFunc::YiiobjectToArray ( $ret, "all" );
		return $rows;
	}

}
?>
